package com.projet.erp.ctx;

import lombok.Data;
import lombok.experimental.Accessors;

import java.sql.Connection;
import java.util.*;

@Data
@Accessors(chain = true)
public class DealVO {
    private String keyword;
    private Boolean needNumber;
    private Connection connection;
    private Set<String> otherTypeSet = new HashSet<>();
    private Set<String> resultSet = new HashSet<>();


    public List<String> toOtherTypeList() {
        List<String> otherTypeList = new ArrayList<>();
        otherTypeList.addAll(otherTypeSet);
        Collections.sort(otherTypeList);
        return otherTypeList;
    }

    public List<String> toResultList() {
        List<String> resultList = new ArrayList<>();
        resultList.addAll(resultSet);
        Collections.sort(resultList);
        return resultList;
    }
}
